package com.example.Project.Class;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.google.gson.JsonObject;

import java.io.Serializable;

public class Apply implements Serializable {
    private static final long serialVersionUID = 1L;
    @JsonProperty("massName")
    private String massName;
    @JsonProperty("name")
    private String Name;
    @JsonProperty("sex")
    private String Sex;
    @JsonProperty("phone")
    private String Phone;
    @JsonProperty("massId")
    private int massId;
    @JsonProperty("userId")
    private int userId;
    public Apply(){}

    public Apply(String massName, String Name, String Sex, String Phone,int massId,int userId) {
        this.massName = massName;
        this.Name = Name;
        this.Sex = Sex;
        this.Phone = Phone;
        this.massId=massId;
        this.userId=userId;
    }

    public String getMassName() {
        return this.massName;
    }

    public String getName() {
        return this.Name;
    }


    public String getSex() {
        return this.Sex;
    }

    public String getPhone() {
        return this.Phone;
    }

    public int getUserId() {
        return userId;
    }

    public int getMassId() {
        return massId;
    }

    public JsonObject toJsonObject(){
        JsonObject jsonContent = new JsonObject();

        jsonContent.addProperty("massName",this.massName);
        jsonContent.addProperty("name",this.Name);
        jsonContent.addProperty("sex",this.Sex);
        jsonContent.addProperty("phone",this.Phone);
        jsonContent.addProperty("massId",this.massId);
        jsonContent.addProperty("userId",this.userId);
        return jsonContent;
    }

    public void setMassName(String massName) {
        this.massName = massName;
    }

    public void setName(String name) {
        Name = name;
    }

    public void setPhone(String phone) {
        Phone = phone;
    }

    public void setType(String sex) {Sex = sex;}
}
